package com.spic.business.ioc.service.impl;

import com.spic.business.ioc.domain.IocWasteDumpGreeningRate;
import com.spic.business.ioc.mapper.IocWasteDumpGreeningRateMapper;
import com.spic.business.ioc.service.IIocWasteDumpGreeningRateService;
import com.spic.common.core.utils.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 排土场治绿率数据IOCService业务层处理
 *
 * @author spic
 * @date 2022-04-14
 */
@Service
public class IocWasteDumpGreeningRateServiceImpl implements IIocWasteDumpGreeningRateService
{
    @Autowired
    private IocWasteDumpGreeningRateMapper iocWasteDumpGreeningRateMapper;

    /**
     * 查询排土场治绿率数据IOC
     *
     * @param id 排土场治绿率数据IOC主键
     * @return 排土场治绿率数据IOC
     */
    @Override
    public IocWasteDumpGreeningRate selectIocWasteDumpGreeningRateById(String id)
    {
        return iocWasteDumpGreeningRateMapper.selectIocWasteDumpGreeningRateById(id);
    }

    /**
     * 查询排土场治绿率数据IOC列表
     *
     * @param iocWasteDumpGreeningRate 排土场治绿率数据IOC
     * @return 排土场治绿率数据IOC
     */
    @Override
    public List<IocWasteDumpGreeningRate> selectIocWasteDumpGreeningRateList(IocWasteDumpGreeningRate iocWasteDumpGreeningRate)
    {
        return iocWasteDumpGreeningRateMapper.selectIocWasteDumpGreeningRateList(iocWasteDumpGreeningRate);
    }

    /**
     * 新增排土场治绿率数据IOC
     *
     * @param iocWasteDumpGreeningRate 排土场治绿率数据IOC
     * @return 结果
     */
    @Override
    public int insertIocWasteDumpGreeningRate(IocWasteDumpGreeningRate iocWasteDumpGreeningRate)
    {
        String uuid = UUIDUtil.createUUID();
        iocWasteDumpGreeningRate.setId(uuid);
        return iocWasteDumpGreeningRateMapper.insertIocWasteDumpGreeningRate(iocWasteDumpGreeningRate);
    }

    /**
     * 修改排土场治绿率数据IOC
     *
     * @param iocWasteDumpGreeningRate 排土场治绿率数据IOC
     * @return 结果
     */
    @Override
    public int updateIocWasteDumpGreeningRate(IocWasteDumpGreeningRate iocWasteDumpGreeningRate)
    {
        return iocWasteDumpGreeningRateMapper.updateIocWasteDumpGreeningRate(iocWasteDumpGreeningRate);
    }

    /**
     * 批量删除排土场治绿率数据IOC
     *
     * @param ids 需要删除的排土场治绿率数据IOC主键
     * @return 结果
     */
    @Override
    public int deleteIocWasteDumpGreeningRateByIds(String[] ids)
    {
        return iocWasteDumpGreeningRateMapper.deleteIocWasteDumpGreeningRateByIds(ids);
    }

    /**
     * 删除排土场治绿率数据IOC信息
     *
     * @param id 排土场治绿率数据IOC主键
     * @return 结果
     */
    @Override
    public int deleteIocWasteDumpGreeningRateById(String id)
    {
        return iocWasteDumpGreeningRateMapper.deleteIocWasteDumpGreeningRateById(id);
    }

    /**
     * @return 排土场治绿率数据
     */

    @Override
    public List<Map<String, Object>> getWasteDumpGreeningRate()
    {
        return null;
    }
}
